#ifndef PELICANOR_H
#define PELICANOR_H

#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QProgressBar>
#include <QComboBox>

#include "heartbeat.h"
#include "anydvdhandler.h"
#include "foldercopierthread.h"
#include "drivewatcher.h"
#include "discidentifier.h"
#include "mymovieapi.h"
#include "copierhandler.h"
#include "tcpconnection.h"
#include "settings.h"
#include "currentstatus.h"

class PelicanoR : public QDialog
{
    Q_OBJECT
public:
    typedef enum {
        STEP_IDLE,
        STEP_START,
        STEP_7ZIP,
        STEP_WINRAR,
        STEP_PAR2,
        STEP_YENC,
        STEP_UPLOADING_NZB,
        STEP_CLEAN_FOLDER,
        STEP_EJECT_DISC,
        STEP_REYENC,
        STEP_MAKE_MKV
    } eSteps;

    explicit PelicanoR(QWidget *parent = 0);
    virtual ~PelicanoR();
    void start();
    
signals:
    
public slots:
    void setStartButtonEnabled();
    void copyDisc();
    void updateProgress(int progress);
    void discDetected();
    void discIdentified(QByteArray id);
    void reloadDisc();
    void copyDone(QString,QString, QString discId, bool parentalControl);
    void step();
private:
    QLabel *lblTitle;
    QLabel *lblStatus;
    QLineEdit * leTitle;
    QProgressBar *progressBar;
    QPushButton *quitButton;
    QPushButton *startButton;
    QComboBox *cmbRegions;

    CopierHandler *copierHandler;
    MyMovieApi *api;
    DriveWatcher *driveWatcher;
    DiscIdentifier *discIdentifier;
    QList<DiscData> _discDataList;
    AnydvdHandler *_anydvdHandler ;
    HeartBeat *_heartBeat;

    QString _deviceId;
    eSteps _currentStep;
    QString _processName;
};

#endif // PELICANOR_H
